import request from "@/musicApi/request";

const api= {
    //获取推荐新歌
    getPersonalizedNewSongs(){
      return request({url:'/personalized/newsong',method:'get',params:{limit:30}})
    },
    //根据歌曲id获取歌曲url，id：歌曲id
    SearchMusicUrl(id) {
        return request({url: '/song/url', method: 'post', params: {id: id}})
    },
    //获取推荐歌单，limit：歌单数量
    getPersonalized(limit) {
        return request({url: '/personalized', method: 'get', params: {limit: limit}})
    },
    //获取歌单详情，id：歌单id
    getPersonalizedRes(id) {
        return request({url: 'playlist/detail', method: 'get', params: {id: id}})
    },
    //获取歌单所有歌曲
    getPersonalizedAllSongs(id){
        return request({url:'/playlist/track/all',method:'get',params:{id:id}})
    },
    //获取歌单评论，id：歌单id
    getPersonalizedComment(id) {
        return request({url: '/comment/playlist', method: 'get', params: {id: id, limit: 100}})
    },
    //获取歌单详情动态
    getPersonalizedDynamic(id) {
        return request({url: '/playlist/detail/dynamic', method: 'get', params: {id: id}})
    },
    //获取热搜列表
    getHotList(){
        return request({url:'/search/hot/detail',method:'get'})
    },
    //搜索建议
    getSearchSuggest(keyWord){
        return request({url:'/search/suggest',method:'get',params:{keywords:keyWord}})
    },
    //关键字搜索
    getSearch(keywords,type){
        return request({url:'/cloudsearch',method:'get',params:{keywords:keywords,type:type,limit:100}})
    },
    //获取专辑内容
    getAlbum(id){
        return request({url:'/album',method:'get',params:{id:id}})
    },
    //获取专辑动态信息
    getAlbumDetail(id){
        return request({url:'/album/detail/dynamic',method:'get',params:{id:id}})
    },
    //获取专辑评论
    getAlbumComment(id){
        return request({url:'/comment/album',method:'get',params:{id:id}})
    },
    //排行榜
    getTopList(){
        return request({url:'/toplist',method:'get'})
    },
    //歌手分类列表
    getArtistsList(type,area,initial){
        return request({url:'/artist/list',method:'get',params:{type:type,area:area,initial:initial}})
    },
    //获取歌手详情
    getArtistDetail(id){
        return request({url:"/artist/detail",method:'get',params:{id:id}})
    },
    //歌手描述
    getArtistDesc(id){
        return request({url:'/artist/desc',method:'get',params:{id:id}})
    },
    //获取歌手单曲
    getArtistSong(id){
        return request({url:'/artists',method:'get',params:{id:id}})
    },
    //获取歌手mv
    getArtistMv(id){
        return request({url:'/artist/mv',method:'get',params:{id:id}})
    },
    //歌词
    getLyric(id){
        return request({url:'/lyric',method:'get',params:{id:id}})
    }

}
export default api